package com.lianyi.push.util;

import android.content.Context;
import android.widget.Toast;

public class ToastUtil {
    private static Toast mToast;

    /**
     * 解决系统Toast连续点击重复显示问题
     *
     * @param msg
     */
    public static void showShortToast(Context mContext, String msg) {
        if (mToast != null) {
            mToast.cancel();
            mToast = null;
        }
        mToast = Toast.makeText(mContext, msg, Toast.LENGTH_SHORT);
        mToast.show();
    }
}
